import time
import threading#线程
#练习生：跳舞，唱歌，打篮球

def singing(name,age=18,score=99):
    print(f"{name}正在唱歌，年龄{age}岁，成绩{score}分" )
    for i in range(5):
        print(f"{name}正在唱歌，第{i}句")
        time.sleep(0.5)
        
if __name__ == "__main__":
    #参数传递方式1：元组，只有一个元素时，记得加逗号（10，）
    #t1 = threading.Thread(target=singing,args=("张三",))
    #参数传递方式2：字典
    #t1 = threading.Thread(target=singing,kwargs={"name":"李四","age":18,"score":98})
    # t1 = threading.Thread(target=singing,args=("张三",19,98))
    # t1 = threading.Thread(target=singing,kwargs={"score":88,"name":"李四","age":17})
    #参数传递方式3：元组+字典 （元组里的元素不可以和字典里的元素冲突）
    t1 = threading.Thread(target=singing,args=("张三",),kwargs={"age":19,"score":98})
    t1.start()